package com.szl.yeb.entity;

import java.io.Serializable;
import java.util.List;

import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.experimental.Accessors;
import lombok.EqualsAndHashCode;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

/**
 * (Department)表实体类
 *
 * @author szl
 * @since 2022-08-24 16:21:22
 */
@ApiModel("Department")
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_department")
public class Department implements Serializable {

    private static final long serialVersionUID = 1L;

    //id
    @ApiModelProperty("id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    //部门名称
    @ApiModelProperty("部门名称")
    @Excel(name = "部门")
    private String name;
    //父id
    @ApiModelProperty("父id")
    private Integer parentId;
    //路径
    @ApiModelProperty("路径")
    private String depPath;
    //是否启用
    @ApiModelProperty("是否启用")
    private Integer enabled;
    //是否上级
    @ApiModelProperty("是否上级")
    private Integer isParent;
    //数据库返回结果
    @ApiModelProperty("数据库返回结果")
    @TableField(exist = false)
    private Integer result;
    //子部门
    @ApiModelProperty("子部门")
    @TableField(exist = false)
    private List<Department> children;

}

